package com.ys.everydaynews.utils

import android.os.CountDownTimer

class AuthCodeTimer(
    millisInFuture: Long,
    countDownInterval: Long,
    mCountDownLitener: CountDownLitener
) : CountDownTimer(millisInFuture, countDownInterval) {

    private val mCountDownListener: CountDownLitener = mCountDownLitener

    override fun onTick(millisUntilFinished: Long) {
        mCountDownListener.isOverTime(false)
        mCountDownListener.countDown(millisUntilFinished)
    }

    override fun onFinish() {
        mCountDownListener.isOverTime(true)

    }
}